//
//  FeedbackViewController.m
//  CPICMobileServiceApp
//
//  Created by lizhiwei on 13-2-27.
//  Copyright (c) 2013年 lizhiwei. All rights reserved.
//

#import "FeedbackViewController.h"
#import "RCAlertViewUtil.h"
#import "NSString+SBJson.h"
#import "Config.h"
#import "FeedbackQueryViewController.h"
#import "AppDelegate.h"
#import "UIImageView+WebCache.h"
#import "ASIFormDataRequest.h"

@interface FeedbackViewController ()

@end

@implementation FeedbackViewController
@synthesize TableViewFeedbackStyle,txvFeedback;
@synthesize curSection, curRow;
@synthesize OperaProblemStr,ProgramErrorStr,OtherproblemStr;
@synthesize Iphone;
@synthesize txtIphone;
@synthesize IphoneStr;
@synthesize progress;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) 
    {
        // Custom initialization
        self.title=@"意见反馈";
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    
    NSUserDefaults *accountDefaults = [NSUserDefaults standardUserDefaults];
    NSString *bgimage= [accountDefaults objectForKey:@"UserDefaultBgKindKey"];
    
    if ([bgimage isEqualToString:@"蓝色主题风格"]) 
    {
        ADD_BACKGROUND_BUTTONITEM(@"icon640X88@2x.png");
        ADD_LEFT_BUTTONITEM(@"back.png");
        ADD_TITLE_NAMEITEM(@"意见反馈");
        ADD_RIGHT_BUTTONITEM_DETAIL(@"back.png");
        self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bg640X773@2x"]];
    }
    else if([bgimage isEqualToString:@"棕色主题风格"])
    {
        ADD_BACKGROUND_BUTTONITEM(@"icon640X88_01@2x.png");
        ADD_LEFT_BUTTONITEM(@"back_01.png");
        ADD_TITLE_NAMEITEM(@"意见反馈");
        ADD_RIGHT_BUTTONITEM_DETAIL(@"back.png");
        self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"bg640X773_01@2x"]];
    }
    else if([bgimage isEqualToString:@"重大节日皮肤"])
    {
        NSData *dataImg_02=[[NSUserDefaults standardUserDefaults]objectForKey:SKIN_IMG_DATA_02];
        NSLog(@"-------找到%@",dataImg_02);
        NSData *dataImg_03=[[NSUserDefaults standardUserDefaults]objectForKey:SKIN_IMG_DATA_03];
        NSData *dataImg_04=[[NSUserDefaults standardUserDefaults]objectForKey:SKIN_IMG_DATA_04];
        
        NSURL *urlSkinImg_02=[NSURL URLWithString:[[NSUserDefaults standardUserDefaults]objectForKey:SKIN_IMG_URL_02]];
        NSURL *urlSkinImg_03=[NSURL URLWithString:[[NSUserDefaults standardUserDefaults]objectForKey:SKIN_IMG_URL_03]];
        NSURL *urlSkinImg_04=[NSURL URLWithString:[[NSUserDefaults standardUserDefaults]objectForKey:SKIN_IMG_URL_04]];
        NSLog(@"-------找到333%@",urlSkinImg_02);
        
        UIImageView * LogoImage = [[UIImageView alloc]init];
        [LogoImage setImageWithURL:urlSkinImg_03 success:^(UIImage *image)
         {
             NSData *imgData=UIImagePNGRepresentation(LogoImage.image);
             [[NSUserDefaults standardUserDefaults] setObject:imgData forKey:SKIN_IMG_DATA_03];
         } failure:^(NSError *error)
         {
             [self justShowMessage:@"更新皮肤失败!" title:@"提示"];
         }];
        
        LogoImage.image = [UIImage imageWithData:dataImg_03];
        LogoImage.frame = CGRectMake(0, 0, LogoImage.image.size.width/2, LogoImage.image.size.height/2);
        [self.view addSubview:LogoImage];
        
        //--------------------------
        UIButton * CallOutBtn1 = [UIButton buttonWithType:UIButtonTypeCustom];
        CallOutBtn1.frame = CGRectMake(10, 10, 109/2, 57/2);
        UIImageView * Back = [[UIImageView alloc]init];
        [Back setImageWithURL:urlSkinImg_02 success:^(UIImage *image)
         {
             NSData *imgData=UIImagePNGRepresentation(Back.image);
             [[NSUserDefaults standardUserDefaults] setObject:imgData forKey:SKIN_IMG_DATA_02];
         } failure:^(NSError *error)
         {
             [self justShowMessage:@"更新皮肤失败!" title:@"提示"];
         }];
        
        [Back setImage:[UIImage imageWithData:dataImg_02]];
        [CallOutBtn1 setImage:Back.image forState:UIControlStateNormal];
        [CallOutBtn1 addTarget:self action:@selector(ClickCallOutBtn) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:CallOutBtn1];
        //--------------------------
        
        ADD_TITLE_NAMEITEM(@"意见反馈");
        
        
        UIImageView *bgimage = [[UIImageView alloc]initWithFrame:CGRectMake(0,44, self.view.frame.size.width, self.view.frame.size.height-44)];
        [bgimage setImageWithURL:urlSkinImg_04 success:^(UIImage *image)
         {
             NSData *imgData=UIImagePNGRepresentation(bgimage.image);
             [[NSUserDefaults standardUserDefaults] setObject:imgData forKey:SKIN_IMG_DATA_04];
         } failure:^(NSError *error)
         {
             [self justShowMessage:@"更新皮肤失败!" title:@"提示"];
         }];
        
        [bgimage setImage:[UIImage imageWithData:dataImg_04]];
        [self.view addSubview:bgimage];
        [bgimage release];
        ADD_RIGHT_BUTTONITEM_DETAIL(@"back.png");
    }

    rowOneIndex=YES;
    rowTwoIndex=NO;
    rowThreeIndex=NO;
    //初始化curRow
    self.curRow = -1;
    
    //添加UITableview
    TableViewFeedbackStyle = [[UITableView alloc]initWithFrame:CGRectMake(8, 51, 310, 280) style:UITableViewStyleGrouped];
    TableViewFeedbackStyle.dataSource = self;
	TableViewFeedbackStyle.delegate = self;
    
    TableViewFeedbackStyle.opaque = NO;
    TableViewFeedbackStyle.backgroundView = nil;
    TableViewFeedbackStyle.autoresizingMask = UIViewContentModeTop;
    TableViewFeedbackStyle.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
    TableViewFeedbackStyle.scrollEnabled=NO;
    TableViewFeedbackStyle.backgroundColor=[UIColor clearColor];
    // [TableViewCarSetting reloadData];
	[self.view addSubview:TableViewFeedbackStyle];
    
    txvFeedback=[[UITextView alloc]initWithFrame:CGRectMake(17, 284, 290, 110)];
    txvFeedback.returnKeyType=UIReturnKeyDone;
    txvFeedback.delegate=self;
    txvFeedback.layer.borderColor = [UIColor grayColor].CGColor;
    txvFeedback.layer.borderWidth =1.0;
    txvFeedback.layer.cornerRadius =5.0;

    [self.view addSubview:txvFeedback];
    
    UIButton *btnAdd=[UIButton buttonWithType:UIButtonTypeCustom];
    [btnAdd setImage:[UIImage imageNamed:@"Submit_suggestion.png"] forState:UIControlStateNormal];
    [btnAdd setTitle:@"提交意见" forState:UIControlStateNormal];
    btnAdd.frame=CGRectMake(86, 408, 310/2, 119/2);
    [btnAdd addTarget:self action:@selector(subFeedback) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btnAdd];
    
    UILabel * lbSuggestion = [[UILabel alloc]initWithFrame:CGRectMake(86, 396, 310/2, 119/2)];
    lbSuggestion.text = @"提交意见";
    lbSuggestion.textAlignment = UITextAlignmentCenter;
    lbSuggestion.textColor = [UIColor whiteColor];
    lbSuggestion.backgroundColor = [UIColor clearColor];
    [self.view addSubview:lbSuggestion];
    [lbSuggestion release];
    
    arrFeedbackStyle=[[NSMutableArray alloc]initWithObjects:@"      操作问题",@"      程序错误",@"      其它问题",@"      手机号码", nil];
}
-(void)ClickCallDetailBtn
{
    FeedbackQueryView = [[FeedbackQueryViewController alloc]init];
    [[AppDelegate app].unc pushViewController:FeedbackQueryView animated:YES];
    [FeedbackQueryView release];
}
-(void) ClickCallOutBtn
{
    
    [self.navigationController popViewControllerAnimated:YES];
}

-(void)subFeedback
{
    NSLog(@"=========%d",self.curRow);
    if([txvFeedback.text isEqualToString:@""]||txvFeedback==nil)
    {
        [self justShowMessage:@"先填写好意见!" title:@"提示"];
        return;
    }
//    if ((int)self.curRow < 0)
//    {
//        [self justShowMessage:@"先选择反馈类型!" title:@"提示"];
//        return;
//    }
//    else
//    {
    
        if (rowOneIndex==YES)
        {
            self.OperaProblemStr = txvFeedback.text;
            self.ProgramErrorStr = @"";
            self.OtherproblemStr = @"";
        }
        else if(rowTwoIndex==YES)
        {
            self.ProgramErrorStr = txvFeedback.text;
            self.OperaProblemStr = @"";
            self.OtherproblemStr = @"";
        }
        else if(rowThreeIndex==YES)
        {
            self.OtherproblemStr = txvFeedback.text;
            self.OperaProblemStr = @"";
            self.ProgramErrorStr = @"";
        }
//    }

    
    NSString * Mobile = txtIphone.text;
    if (![self isValidateMobile:Mobile])
    {
        [self justShowMessage:@"非法的手机号码,请输入正确的手机号码" title:@""];
        return;
    }
    
    IphoneStr = txtIphone.text;
    
    [self setRequest];
}

-(void)setRequest//向太保移动平台发送请求报文
{
    NSDictionary *dictUserInfo=[[NSUserDefaults standardUserDefaults] dictionaryForKey:DICT_USER_INFO];
    NSString * UserAccount;
    if (dictUserInfo!=nil) 
    {
        if ([dictUserInfo valueForKey:@"UserAccount"]) 
        {
            NSLog(@"%@",[dictUserInfo valueForKey:@"UserAccount"]);
            UserAccount = [dictUserInfo valueForKey:@"UserAccount"];
        }
    }
    else
    {
        UserAccount=@"cpic";
    }

//    NSString *strRequestCode=@"RequestCode=60401";
    NSString *strRequestData=[NSString stringWithFormat:@"{\"userAccount\":\"%@\",\"operaProblem\":\"%@\",\"programError\":\"%@\",\"otherProblem\":\"%@\",\"phone\":\"%@\",\"phonetype\":\"%@\"}",UserAccount,self.OperaProblemStr,self.ProgramErrorStr,self.OtherproblemStr,self.IphoneStr,@"1"];
//    NSString *strUrl=[NSString stringWithFormat:@"%@%@%@",Server_Url,strRequestCode,strRequestData];
//    NSLog(@"++++++++++++++%@",strUrl);
//    strUrl = [strUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];//字符串编码转换
//    
//    NSURL *myurl = [NSURL URLWithString:strUrl];//This method expects URLString to contain any necessary percent escape codes, which are ‘:’, ‘/’, ‘%’, ‘#’, ‘;’, and ‘@’. Note that ‘%’ escapes are translated via UTF-8.
//    NSLog(@"URL:%@",myurl);
    //NSString *urlString = [NSString stringWithFormat:@"http://10.74.1.28:7001/mini-interface/mobileServlet"];
    ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:Server_Url_Form]];
    //设置需要POST的数据，这里提交两个数据，A=a&B=b
    [request setPostValue:@"60401" forKey:@"RequestCode"];
    [request setPostValue:strRequestData forKey:@"RequestData"];
    
    [request setDelegate:self];
    [request setDidFailSelector:@selector(ResponseFail:)];
    [request setDidFinishSelector:@selector(ResonseSuccess:)];
    [request startAsynchronous];
    
    showProgress = YES;
    if (showProgress)
    {
        progress= [[MBProgressHUD alloc]initWithView:self.view];
        [self.view addSubview:progress];
        [self.view bringSubviewToFront:progress];
        progress.labelText = @"等待中...";
        [progress show:YES];
        showProgress = NO;
    }
}

- (void)ResonseSuccess:(ASIHTTPRequest *)request
{
    if (!showProgress)
    {
        [progress removeFromSuperview];
        progress = nil;
    }
    
    NSString *responseString = [request responseString];
    NSLog(@"responseString %@",responseString);
    NSMutableDictionary *dictResponse=[responseString JSONValue];
    NSMutableDictionary *jsonoSubObj = [dictResponse objectForKey:@"head"];
    NSString * ss = [[NSString alloc] initWithFormat:@"%@",[jsonoSubObj objectForKey:@"success"]];
    if ([ss isEqualToString:@"1"])
    {
        //[self justShowMessage:@"提交成功！" title:@"提示"];
        UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:@"提示" message:@"提交成功！" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];
        [alertView show];
        alertView.delegate = self;
        [alertView release];
    }
    else
    {
        [self justShowMessage:@"提交失败！" title:@"提示"];
    }
}

- (void)ResponseFail:(ASIHTTPRequest *)request
{
    if (!showProgress)
    {
        [progress removeFromSuperview];
        progress = nil;
    }
    
    NSLog(@"服务器连接失败!");
    [self justShowMessage:@"服务器连接失败！" title:@"提示"];
}

- (void)alertView:(UIAlertView *)alert clickedButtonAtIndex:(NSInteger)buttonIndex
{
    switch(alert.tag)
    {
        case 0:
            if (buttonIndex == [alert cancelButtonIndex])
                //默认cancelButtonIndex = 0，每个按钮index可设
            {
                FeedbackQueryView = [[FeedbackQueryViewController alloc]init];
                [[AppDelegate app].unc pushViewController:FeedbackQueryView animated:YES];
                [FeedbackQueryView release];
            }
            break;
        default:
            break;
    }
}

#pragma UITableViewDelegate

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return [arrFeedbackStyle count];
}


-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 50;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    static NSString *Identifier=@"Identifier";
    UITableViewCell *cell=(UITableViewCell *)[TableViewFeedbackStyle dequeueReusableCellWithIdentifier:Identifier];
    if (cell==nil)
    {
        cell=[[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:Identifier]autorelease];
        cell.accessoryType = UITableViewCellAccessoryNone;
        cell.selectionStyle=UITableViewCellSelectionStyleNone;//选中后颜色没变化
        
        UILabel *lblAutoStyle=[[UILabel alloc]initWithFrame:CGRectMake(20, 14.5, 210, 21)];
        lblAutoStyle.backgroundColor=[UIColor clearColor];
        lblAutoStyle.text=[arrFeedbackStyle objectAtIndex:indexPath.row];
        lblAutoStyle.font = [UIFont systemFontOfSize:14.0];
        
        [cell addSubview:lblAutoStyle];
        [lblAutoStyle release];
        
        if (indexPath.row == 3)
        {
            txtIphone = [[UITextField alloc]initWithFrame:CGRectMake(120, 8, 170,31)];
            txtIphone.returnKeyType = UIReturnKeyDone;
            CustomNumbleKeyboardView *customKeyboardView = [[CustomNumbleKeyboardView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 238)];
            customKeyboardView.delegate = self;
            [txtIphone setInputView:customKeyboardView];
            txtIphone.delegate =self;
            txtIphone.borderStyle=UITextBorderStyleLine;
            txtIphone.font = [UIFont systemFontOfSize:14.0];
            NSDictionary * dictCustomerInfo =[[NSUserDefaults standardUserDefaults] dictionaryForKey:DICT_CUSTOMER_INFO];
            if (dictCustomerInfo!=nil)
            {
                
                if ([dictCustomerInfo valueForKey:@"phone"]) {
                    txtIphone.text=[dictCustomerInfo valueForKey:@"phone"];
                }
            }
            else
            {
                
            }
            [cell addSubview:txtIphone];
        }

        
    }

    UIButton *button = [ UIButton buttonWithType:UIButtonTypeCustom ];
    CGRect frame = CGRectMake( 25.0 , 5.0 , 48/2 , 48/2 );
    button. frame = frame;
    button. backgroundColor = [UIColor clearColor ];
    if(indexPath.row==0)
    {
        UIImage *image;
        if (rowOneIndex==YES) {
            image= [ UIImage imageNamed:@"selecton.png" ];
        }
        else
        {
            image= [ UIImage imageNamed:@"selectoff.png" ];
        }
        [button setBackgroundImage:image forState:UIControlStateNormal ];
        cell.accessoryView=button;
        button.tag=0;
        [button addTarget:self action:@selector(didSelectRowOne:) forControlEvents:UIControlEventTouchUpInside];
    }
    else if(indexPath.row==1)
    {
        UIImage *image;
        if (rowTwoIndex==YES) {
            image= [ UIImage imageNamed:@"selecton.png" ];
        }
        else
        {
            image= [ UIImage imageNamed:@"selectoff.png" ];
        }
        [button setBackgroundImage:image forState:UIControlStateNormal ];
        cell.accessoryView=button;
        button.tag=1;
        [button addTarget:self action:@selector(didSelectRowTwo:) forControlEvents:UIControlEventTouchUpInside];
    }
    else if(indexPath.row==2)
    {
        UIImage *image;
        if (rowThreeIndex==YES) {
            image= [ UIImage imageNamed:@"selecton.png" ];
        }
        else
        {
            image= [ UIImage imageNamed:@"selectoff.png" ];
        }
        [button setBackgroundImage:image forState:UIControlStateNormal ];
        cell.accessoryView=button;
        button.tag=2;
        [button addTarget:self action:@selector(didSelectRowThree:) forControlEvents:UIControlEventTouchUpInside];
    }
    



    
    return cell;
}

-(void)didSelectRowOne:(id)sender
{
    rowOneIndex=YES;
    rowTwoIndex=NO;
    rowThreeIndex=NO;
    [TableViewFeedbackStyle reloadData];

}

-(void)didSelectRowTwo:(id)sender
{
    rowOneIndex=NO;
    rowTwoIndex=YES;
    rowThreeIndex=NO;
    [TableViewFeedbackStyle reloadData];
}

-(void)didSelectRowThree:(id)sender
{
    rowOneIndex=NO;
    rowTwoIndex=NO;
    rowThreeIndex=YES;
    [TableViewFeedbackStyle reloadData];
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.row<=2)
    {
        NSIndexPath *prevIndexPath = [NSIndexPath indexPathForRow:curRow inSection:curSection];
        UITableViewCell* cell = [tableView cellForRowAtIndexPath:prevIndexPath];
        cell.accessoryType = UITableViewCellAccessoryNone;
        
        curSection = indexPath.section;
        curRow = indexPath.row;
        
        //add new check mark
        cell = [tableView cellForRowAtIndexPath:indexPath];
        cell.accessoryType = UITableViewCellAccessoryCheckmark;
    }
}


//数字键盘
- (void)numberKeyBoardInput:(NSInteger) number
{
    NSMutableString *textString = [[[NSMutableString alloc] initWithFormat:@"%@%d",txtIphone.text,number] autorelease];
    if ([textString length]>11)
    {
        [self justShowMessage:@"手机号码输入不能超过11位!" title:@""];
        return;
    }
    txtIphone.text = textString;
}

- (void)numberKeyBoardBackspace
{
    NSMutableString* mutableString = [[[NSMutableString alloc] initWithFormat:@"%@", txtIphone.text] autorelease];
    if ([mutableString length] >=1) {
        NSRange tmpRange;
        tmpRange.location = [mutableString length] - 1;
        tmpRange.length = 1;
        [mutableString deleteCharactersInRange:tmpRange];
    }
    txtIphone.text = mutableString;
    
}

- (void)numberKeyBoardFinish
{
    [txtIphone resignFirstResponder];
}

/*手机号码验证*/
-(BOOL) isValidateMobile:(NSString *)mobile
{
    //手机号以13， 15，18开头，八个 \d 数字字符
    NSString *phoneRegex = @"^((13[0-9])|(15[^4,\\D])|(18[0,0-9]))\\d{8}$";
    NSPredicate *phoneTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",phoneRegex];
    return [phoneTest evaluateWithObject:mobile];
}


-(BOOL)textFieldShouldReturn:(UITextField *)textField
{
    [textField resignFirstResponder];
    return YES;
}

/*- (void)textViewDidChange:(UITextView *)textView
{
    [textView resignFirstResponder];
}*/

- (void)textViewDidBeginEditing:(UITextView *)textView
{
    if(textView==txvFeedback)
    {
        [self SetAnimation:180];
    }
}
- (void)textViewDidEndEditing:(UITextView *)textView
{
    if(textView==txvFeedback)
    {
        [self backAnimation:180];
    }
}

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
    /*if(textView==txvFeedback)
    {
        if(range.location>=200)
        {
            return NO;
        }
        else
        {
            return YES;
        }
    }*/
    
    if ([@"\n" isEqualToString:text] == YES)
    {
        [textView resignFirstResponder];
        return NO;
    }
    
    return YES;
}

- (void)textFieldDidBeginEditing:(UITextField *)textField
{
    if(textField==txtIphone)
    {
        [self SetAnimation:80];
    }
    
}
- (void)textFieldDidEndEditing:(UITextField *)textField
{
    if(textField==txtIphone)
    {
        [self backAnimation:80];
    }
}

-(void)SetAnimation:(CGFloat)Xorigin
{
    NSTimeInterval animationDuration = 0.30f;
    CGRect frame = self.view.frame;
    //frame.origin.x+=Xorigin;
    frame.origin.y-=Xorigin;
    //frame.size.height +=Xorigin;
    self.view.frame = frame;
    [UIView beginAnimations:@"ResizeForKeyboard" context:nil];
    [UIView setAnimationDuration:animationDuration];
    self.view.frame = frame;
    [UIView commitAnimations];
}

-(void)backAnimation:(CGFloat)Xorigin
{
    NSTimeInterval animationDuration = 0.30f;
    CGRect frame = self.view.frame;
    //frame.origin.x -=Xorigin;
    frame.origin.y+=Xorigin;
    //frame.size.height -=Xorigin;
    self.view.frame = frame;
    [UIView beginAnimations:@"ResizeForKeyboard" context:nil];
    [UIView setAnimationDuration:animationDuration];
    self.view.frame = frame;
    [UIView commitAnimations];
    // [textField resignFirstResponder];
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    [Iphone release];
    [OperaProblemStr release];
    [ProgramErrorStr release];
    [OtherproblemStr release];
    [txtIphone release];
    [IphoneStr release];
    [FeedbackQueryView release];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

-(void)dealloc
{
    [arrFeedbackStyle release];
    [TableViewFeedbackStyle release];
    [super dealloc];
}

@end
